import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '',
    component: () => import('@/views/user/index.vue'),
    children:[
      {
        path: '/',
        name: 'shouye',
        component: () => import('@/views/shouye/shouye.vue')
      },
      {
        path: '/shipin',
        name: 'shipin',
        component: () => import('@/views/shipin/shipin.vue')
      },
      {
        path: '/wode',
        name: 'wode',
        component: () => import('@/views/wode/wode.vue')
      },
      {
        path: '/wenda',
        name: 'wenda',
        component: () => import('@/views/wenda/wenda.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('@/views/search/search.vue')
  },
  {
    path: '/xiangqing:id',
    name: 'xiangqing',
    component: () => import('@/views/xiangqing/index.vue'),
    props:true
  },
  {
    path: '/xiugai',
    name: 'xiugai',
    component: () => import('@/views/xiugai/index.vue')
  }
]
const router = new VueRouter({
  routes
})

export default router
